package com.sc.nft.service;

import com.alibaba.fastjson.JSONObject;
import com.sc.nft.dto.*;
import com.sc.nft.dto.hna.HnaFastPayReq;
import com.sc.nft.entity.PayOrder;
import com.sc.nft.entity.SandWithdrawRecord;
import com.sc.nft.entity.UserInfo;
import com.sc.nft.hna.resp.FastPayNotifyResp;

import java.util.Map;

public interface UserHnaExtService {
  /**
   * 开户
   *
   * @param userInfo
   * @param dto
   * @return
   */
  String createAccount(UserInfo userInfo, UserHnaAccountCreateDTO dto);

  /**
   * 快捷支付下单（发送短信）
   *
   * @param userInfo
   * @return
   */
  JSONObject fastPay(UserInfo userInfo, HnaFastPayDTO dto);

  String mallFastPay(UserInfo userInfo, HnaFastPayReq req);

  /**
   * 快捷支付确认（校验短信）
   *
   * @return
   */
  void fastPayConfirm(PayOrder payOrder,String verifyCode);
  String fastPayConfirm(UserInfo userInfo, HnaFastPayConfirmDTO dto);
  /**
   * 快捷支付异步回调
   *
   * @param param
   * @return
   */
  String fastPayNotify(Map<String, Object> param);

  /**
   * 提现异步回调
   *
   * @param param
   * @return
   */
  String withdrawNotify(Map<String, Object> param);

  /**
   * 绑卡
   *
   * @param userInfo
   * @param dto
   * @return
   */
  long bindCard(UserInfo userInfo, HnaCardBindDTO dto);

  /**
   * 绑卡确认
   *
   * @param userInfo
   * @param dto
   * @return
   */
  String bindCardConfirm(UserInfo userInfo, HnaCardBindConfirmDTO dto);

  /**
   * 提现
   *
   * @param userInfo
   * @param dto
   * @return
   */
  void withdraw(UserInfo userInfo, HnaWithdrawDto dto);

  /**
   * 用户信息查询
   *
   * @param userInfo
   * @return
   */
  JSONObject userInfo(UserInfo userInfo);

  /**
   * 转账
   *
   * @param userInfo
   * @param tranAmount
   * @return
   */
  String transfer(UserInfo userInfo, String tranAmount);

  JSONObject refund(UserInfo userInfo, HnaRefundDto dto);

  /**
   * 退款回调
   *
   * @param param
   * @return
   */
  String refundNotify(Map<String, Object> param);

  /**
   * 调用新生支付的提现接口
   *
   * @param record
   * @param pass
   * @param dto
   * @param remark
   */
  void doWithdraw(SandWithdrawRecord record, boolean pass, HnaWithdrawDto dto, String remark);
}
